package com.lfy.domian;

import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class aliforTest2 implements InitializingBean,BeanNameAware{

    @Autowired
    public void aito(AliforTest1 aliforTest1){
        System.out.println("autowired");
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("InitalizingBean");
    }
    @PostConstruct
    public void init(){
        System.out.println("PostConstruct");
    }

    @Override
    public void setBeanName(String s) {
        System.out.println("Aware");
    }
}
